#include <stdio.h>
#include <stdlib.h>

#define kMaxSize 1001
typedef int Position; /* 整型下标，表示元素的位置 */
typedef struct StringNode *String;
struct StringNode {
    char data[kMaxSize]; /* 存储字符的数组 */
    int length; /* 字符串长度 */
};

String InitStr() {
    /* 初始化一个空的字符串 */
    String s;

    s = (String)malloc(sizeof(struct StringNode));
    s->length = 0;

    return s;
}

/* 算法4-3：字符串截取子串操作  SubString(s, pos, len) */
String SubString(String s, int pos, int len) {
    /* pos从1开始 */
    int n;
    Position i;
    String sub_s;

    sub_s = InitStr(); /* 初始化新串sub_s */
    n = s->length;
    i = 0;
    while (((pos - 1 + i) <= n) && (i < len)) {
        /* 若s从pos-1开始不到len个字符，就截取到s的末尾为止 */
        /* 将s串从pos-1之后的len个字符复制到sub_s */
        sub_s->data[i] = s->data[pos - 1 + i];
        sub_s->length++;
        i++;
    }
    sub_s->data[i] = '\0';
    return sub_s;
}
/* 算法4-3 结束 */

String ReadString() {
    Position i;
    String s;

    s = InitStr(); /* 创建空的字符串 */
    i = 0;
    s->data[i] = getchar();
    while (s->data[i] != '\n') {
        i++;
        s->data[i] = getchar();
    }
    s->data[i] = '\0'; /* 字符串结束符占1位 */
    s->length = i;
    return s;
}

int main(void) {
    Position pos;
    int len;
    String s, sub_s;

    s = ReadString();
    scanf("%d %d", &pos, &len);
    sub_s = SubString(s, pos, len);
    printf("%s\n", sub_s->data);

    return 0;
}